<div style="margin:1% 5%;">
  <div class="layui-form-item" style=";padding-left: 30%;">

    <div class="layui-input-inline">
      <input type="text" id="apkNameval" placeholder="请输入应用名称" autocomplete="off" class="layui-input">

    </div>
    <label class="layui-form-label" style="padding: 0!important;"><button type="button" id="btnSearch" class="layui-btn">搜索</button></label>
  </div>
</div>
<div style="padding-left: 50px;">
  <caption style="margin-left: 40px;"><span >
                <button type="button" class="btn btn-primary layui-btn"  onclick="method5('tableExcel')">
                    <span class="glyphicon glyphicon-folder-open">导出Excel</span>
                </button>
            </span>
  </caption>
</div>
<script type="text/html" id="tol">
  <div>
    <div style="float:left;">系统升级列表</div>
    <div style="float:right;margin-right: 50px">共有数据：<span id="count"></span>条</div>
  </div>
</script>
<table class="layui-table" id="apkbao" lay-filter="apkbao"></table>

<script type="text/html" id="caozuo">
  <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">选择</a>

</script>

<script>


    var local_store = layui.data("local_store");
    var local = local_store.token;
    $.ajax({
        type:"get",
        url:"/admin/station/query/stationLoginQuanxXian?stationId="+json.id,
        dataType: "json",
        contentType:"application/json;charset=utf-8",
        beforeSend: function(request) {
            request.setRequestHeader("token", local);
        },
        success:function (res) {
            if(res.code==500){
                alert("权限不足")
                location="../../admin/main.html";
                return
            }}})
    var pages= localStorage.getItem('page');
  layui.use('table', function(){
    var table = layui.table;

    table.render({
      elem: '#apkbao'
      ,  id: "t"
      ,  toolbar:"#tol"
      , method: 'post'
      ,url:'/admin/system-apk/SearchSystemApk'
      ,cols: [[
      {field:'systemApkId', title: '编号', width: "7%",
          align: "center"}
        ,{field:'systemApkName', title: '应用名称',width: "10%",
          align: "center"}
        ,{field:'systemApkPackageName', width: "12%",
          align: "center", title: '应用包名'}
        ,{field:'systemApkUrl',width: "20%",
          align: "center",  title: '文件名'}
        ,{field:'systemApkVesion', title: '版本',width: "10%",
          align: "center"} //minWidth：局部定义当前单元格的最小宽度，layui 2.2.1 新增
        ,{field:'systemApkVersionName', width: "8%",
          align: "center", title: '版本名称'}
        ,{field:'systemApkVersionName',width: "8%",
          align: "center",  title: '是否升级'}
        ,{
          title:'操作',
          align:'center',
          toolbar:'#caozuo',
          fixed: 'right'
        }
      ]],page:{
            curr:pages
        },
      done: function(res, curr, count){
          localStorage.setItem('page',curr);
        $("#count").html(count);
      }
    });

    $("#btnSearch").click(function(){
      table.reload("t",{
        where:{
          apkName:$("#apkNameval").val()
        },
        page:{
          curr:1
        }
      });
    });

  });
</script>
